package com.xcity.game.employee.template;

import com.xcity.game.employee.EmployeeQuality;

import naga.x.game.template.Template;
import naga.x.game.template.TemplateException;
import naga.x.game.template.annotation.Excel;

/**
 * 员工技能产出
 * @author yang.li
 *
 */
@Deprecated
@Excel(value = "employee.xlsx", sheetName = "员工技能产出")
public class EmployeeSkillProduceTemplate extends Template {

	/** 产出概率（整数） */
	protected int[] weights;
	
	public int[] getWeights() {
		return weights;
	}

	public void setWeights(int[] weights) {
		this.weights = weights;
	}

	@Override
	public void validate() throws TemplateException {
		if (weights == null || weights.length != EmployeeQuality.length()) {
			throw new TemplateException("员工技能产出配置错误: id=" + id);
		}
	}
}
